package demo1;

import java.util.Scanner;

public class demo_5 {
    public static void main(String[] args) {
        String seat;
        int month;
        Scanner sc = new Scanner(System.in);
        System.out.println("请您输入你选的座位类型：");
        seat = sc.next();
        System.out.println("请您输入你买的月份：");
        month = sc.nextInt();
        switch(seat){
            case "头等舱":
                if (5 <= month && month <= 10){
                    System.out.println("9折");
                }
                else System.out.println("7折");
                break;
            case "经济舱":
                if (5 <= month && month <= 10){
                    System.out.println("8.5折");
                }
                else System.out.println("6.5折");

        }
    }

}
